package com.asm.demo.pointman.instrumentation;

import java.lang.instrument.UnmodifiableClassException;

import com.asm.demo.pointman.asm.ForASMTestClass;
/*
* 1.将InstForTransformer打包为transformer.jar
* 2.文件MANIFEST.MF增加"Premain-Class: com.asm.demo.pointman.instrumentation.InstForTransformer"
* 3.将javassist.jar加入到环境变量中
* 4.运行:java -javaagent:/tmp/transformer.jar com.asm.demo.pointman.instrumentation.TestformerTestMain
* */
public class TestformerTestMain {

    public static void main(String []args) throws UnmodifiableClassException {
        //InstForTransformer.reTransClass(ForASMTestClass.class);
        ForASMTestClass testClass = new ForASMTestClass();
        testClass.display1();
        testClass.display2();
    }
}
